;
(function() {
	var db = require("../../core/db/index");
	var config = require("../../core/_include/config");
	var origin = require("../origin");
	module.exports = {
		prefix: "/domain",
		get: {
			"/list": function() {
				var data = db.find_all(config.dbname.domain)
				this.body = JSON.stringify(data, null, 4);
			},
			"/clear": function() {
				db.remove_list(config.dbname.domain, {});
				var data = db.find_all(config.dbname.domain)
				this.body = JSON.stringify(data, null, 4);
			},
			"/white_list": function() {
				this.body = JSON.stringify(origin.white_list_map);
			}
		}
	}
}());